package com.hong.pro.enums;

import java.util.concurrent.TimeUnit;

/**
 * @Description:
 * @Author Hong Qiang
 * @Date 2023/3/6 18:30
 * @Version 1.0
 */
public enum CacheType {

    //BaseInfo 缓存24小时
    BASE_INFO(24, TimeUnit.HOURS),
    //alarmMonitor 缓存4小时
    ALARM_MONITOR(4,TimeUnit.HOURS),
    //gps 缓存10分钟
    GPS_INFO(1,TimeUnit.MINUTES);

    private int expires;
    private TimeUnit unit;

    CacheType(int expires,TimeUnit unit) {
        this.expires = expires;
        this.unit = unit;
    }

    public int getExpires() {
        return expires;
    }

    public TimeUnit getUnit(){
        return unit;
    }
}
